interface IShape {
  x: number;
  y: number;
  move: (x: number, y: number) => void;
}

function Shape() {
  this.x = 0;
  this.y = 0;
}
Shape.prototype = {
  move(x: number, y: number): void {
    this.x += x;
    this.y += y;
    console.info('Shape moved.');
  }
};




interface IRectangle extends IShape {
}

function Rectangle() {
  Shape.call(this);
}
Rectangle.prototype = Object.create(Shape.prototype);
Object.defineProperty(Rectangle.prototype, 'constructor', {
  enumerable: false,
  value: Rectangle
});
